function addTimestamp(constructor): any{
    return class extends constructor{
        timestamp = new Date()
    }
}
interface Document {
    timestamp: Date
}
@addTimestamp
class Document{
    constructor(public title: string){}
}

const doc = new Document('my document')
console.log(doc.title)
console.log(doc.timestamp)
export {}